#pragma once
//#include "/home/cl/cprodll/cpp-httplib/httplib.h"
#include "httplib.h"
#include<iostream>
#include"nlohmann/json.hpp"
#include<mysql/mysql.h>
class CServer
{
public:
	CServer();
	~CServer();
	void DoServer();		//执行流程
	void LinkToDatabase();		//连接数据库
	void ReceFromClient();		//接收客户端请求
	void StartUpListen();		//启动客户端监听
	void ReceDelete();		//接收客户端删除数据请求
        void RecePost();		//接收客户端创建数据请求
        void ReceGet();			//接收客户端查询数据请求
	void RecePut();			//接收客户端更新数据请求
private:
	httplib::Server m_serverManager;//服务端
	MYSQL m_serverMysql;		//连接的数据库
	MYSQL_RES* m_pServerRes;	//接收数据库返回结果
	MYSQL_ROW m_serverSqlRow;	
	httplib::Headers m_serverHeader;
};

